package manage.dao;

import manage.domain.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;


import java.util.List;

public interface UserDao {

    public  boolean insert(User user);

    public  boolean update(User user);

    public boolean delete(Integer id);

    public User selectById(Integer id);
    public int isExistByUserName(String userame);
    public User selectByUsernameAndPassword(@Param("username") String username, @Param("password") String password);

    public List<User> selectsByCondition(@Param("condition") User condition,  @Param("skip") Integer skip, @Param("take") Integer take);

    public int sizeByCondition(@Param("condition") User condition);
}
